+Wed Jan 21 23:27:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fix #131869:
+
+ * gtk/gtkaction.c (_gtk_action_emit_activate): Hold
+ a reference to the group while emitting the signals.
+
+ * gtk/gtkactiongroup.c (gtk_action_group_init): Use a
+ destroy notify which does not only unref, but also resets
+ the action_group property of the action.
+
2004-01-20 Federico Mena Quintero <federico@ximian.com>
* NEWS: Added details about GtkFileChooser changes.
+Wed Jan 21 23:27:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fix #131869:
+
+ * gtk/gtkaction.c (_gtk_action_emit_activate): Hold
+ a reference to the group while emitting the signals.
+
+ * gtk/gtkactiongroup.c (gtk_action_group_init): Use a
+ destroy notify which does not only unref, but also resets
+ the action_group property of the action.
+
2004-01-20 Federico Mena Quintero <federico@ximian.com>
* NEWS: Added details about GtkFileChooser changes.
+Wed Jan 21 23:27:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fix #131869:
+
+ * gtk/gtkaction.c (_gtk_action_emit_activate): Hold
+ a reference to the group while emitting the signals.
+
+ * gtk/gtkactiongroup.c (gtk_action_group_init): Use a
+ destroy notify which does not only unref, but also resets
+ the action_group property of the action.
+
2004-01-20 Federico Mena Quintero <federico@ximian.com>
* NEWS: Added details about GtkFileChooser changes.
+Wed Jan 21 23:27:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fix #131869:
+
+ * gtk/gtkaction.c (_gtk_action_emit_activate): Hold
+ a reference to the group while emitting the signals.
+
+ * gtk/gtkactiongroup.c (gtk_action_group_init): Use a
+ destroy notify which does not only unref, but also resets
+ the action_group property of the action.
+
2004-01-20 Federico Mena Quintero <federico@ximian.com>
* NEWS: Added details about GtkFileChooser changes.
+Wed Jan 21 23:27:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fix #131869:
+
+ * gtk/gtkaction.c (_gtk_action_emit_activate): Hold
+ a reference to the group while emitting the signals.
+
+ * gtk/gtkactiongroup.c (gtk_action_group_init): Use a
+ destroy notify which does not only unref, but also resets
+ the action_group property of the action.
+
2004-01-20 Federico Mena Quintero <federico@ximian.com>
* NEWS: Added details about GtkFileChooser changes.
{
GtkActionGroup *group = action->private_data->action_group;
- if (group != NULL)
- _gtk_action_group_emit_pre_activate (group, action);
+ if (group != NULL)
+ {
+ g_object_ref (group);
+ _gtk_action_group_emit_pre_activate (group, action);
+ }
g_signal_emit (action, action_signals[ACTIVATE], 0);
- if (group != NULL)
- _gtk_action_group_emit_post_activate (group, action);
+ if (group != NULL)
+ {
+ _gtk_action_group_emit_post_activate (group, action);
+ g_object_unref (group);
+ }
}
/**
g_type_class_add_private (gobject_class, sizeof (GtkActionGroupPrivate));
}
+
+static void
+remove_action (GtkAction *action)
+{
+ g_object_set (action, "action_group", NULL, NULL);
+ g_object_unref (action);
+}
+
static void
gtk_action_group_init (GtkActionGroup *self)
{
self->private_data->visible = TRUE;
self->private_data->actions = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
- (GDestroyNotify) g_object_unref);
+ (GDestroyNotify) remove_action);
self->private_data->translate_func = NULL;
self->private_data->translate_data = NULL;
self->private_data->translate_notify = NULL;
/* extra protection to make sure action->name is valid */
g_object_ref (action);
g_hash_table_remove (action_group->private_data->actions, gtk_action_get_name (action));
- g_object_set (G_OBJECT (action), "action_group", NULL, NULL);
g_object_unref (action);
}